<?
header("Content-Type:text/html;charset=utf-8");
include_once 'include/include.php';
if ($_SESSION["Mflevel"]>1)
{
	echo '<SCRIPT language=javascript>
		alert("您的用户权限不允许使用此功能！");
		window.location.href="javascript:history.back()";
		</script>';
	exit;
}
c_create::createClass('setPage');
$page = new setPage();
c_create::createClass('admin');
$admininfo = new admin();
$outvar[headline] = '管理员列表';
if ($_GET[did]){
	if ($admininfo->deleteRecord($_GET[did])){
		$_SESSION[showtips]	 = '删除成功！';
	}else {
		$_SESSION[showtips]	 = '删除失败！';
	}
}
$tablename = TABLE_ADMIN."";

$where = " $tablename WHERE Madmin<>'admin' AND Madmin<>'pennyowen' ORDER BY `Madminid` DESC ";
$query = "SELECT COUNT(*) FROM ".$where;
$page->setPagePHP(20,10,$dbconn->Getonefield($query));
$query = "SELECT * FROM ".$where.$page->limit;
$nowQueryid = $dbconn->Query($query);
$i = 0;
while ($row = $dbconn->next_record($nowQueryid)){
	$row[num] = $i+1;
	$array[] = $row;
	$i++;
}

$outvar[page] = $page->menuAll;
$outvar[record] = $array;
$outvar[fileurl_1] = getFileWithVar('',array('id','did'));
//$outvar[fileurl_2] = getFileWithVar('',array('id','did','Madminid'));
require_once("./include/xajax_common.php");
$outvar[xajax_javascript] = $xajax->getJavascript('../module/xajax/');
outFile("managelist");
?>